/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.xd.dao;

import java.util.Collection;
import java.util.List;

import com.xy.biz.xd.domain.bo.DocumentReleaseBO;
import com.xy.biz.xd.domain.po.DocumentReleasePO;
import com.xy.biz.xd.domain.query.DocumentReleaseQuery;

/**
 *
 *
 * @author wcs
 * @date 2021-3-4
 */
public interface DocumentReleaseDao {

    /**
     * 保存
     *
     * @param documentReleasePO
     */
    int saveDocumentRelease(DocumentReleasePO documentReleasePO);

    /**
     * 保存多个
     *
     * @param collection
     */
    int saveAllDocumentRelease(Collection<DocumentReleasePO> collection);

    /**
     * 更新
     *
     * @param documentReleasePO
     */
    int updateDocumentRelease(DocumentReleasePO documentReleasePO);

    int updateAllDocumentRelease(Collection<DocumentReleasePO> collection);

    /**
     * 更新生效时间
     *
     * @param documentReleasePO
     */
    int updateDocumentReleaseEffectDateById(DocumentReleasePO documentReleasePO);

    /**
     * 删除
     *
     * @param documentReleaseId
     */
    int deleteDocumentRelease(Long documentReleaseId);

    /**
     * 删除
     *
     * @param collection
     */
    int deleteAllDocumentRelease(Collection<Long> collection);

    /**
     * 查找一个
     *
     * @param documentReleaseId
     * @return
     */
    DocumentReleasePO getDocumentRelease(Long documentReleaseId);

    /**
     * @param documentCode
     * @return
     */
    List<DocumentReleasePO> listDocumentReleaseByDocumentCode(String documentCode);

    /**
     * 查找一个
     *
     * @param documentReleaseQuery
     * @return
     */
    DocumentReleasePO getDocumentRelease1(DocumentReleaseQuery documentReleaseQuery);

    /**
     * 查找多条
     *
     * @param query
     * @return
     */
    List<DocumentReleasePO> listDocumentReleaseById(DocumentReleaseQuery query);

    /**
     * 条件查找多条
     *
     * @param query 查找条件
     * @return
     */
    List<DocumentReleasePO> listDocumentRelease(DocumentReleaseQuery query);

    /**
     * 条件查找多条
     *
     * @param query 查找条件
     * @return
     */
    List<DocumentReleasePO> listAllDocumentRelease(DocumentReleaseQuery query);

    /**
     *根据查找多条
     *
     * @param collection 查找条件
     * @return
     */
    List<DocumentReleasePO> listDocumentReleaseByReleaseId(Collection<Long> collection);

    /**
     * 按类型条件查找统计个数
     *
     * @param query 查找条件
     * @return
     */
    int countDocumentReleaseByFlowId(DocumentReleaseQuery query);

    /**
     * 按类型条件查找统计个数
     *
     * @param query 查找条件
     * @return
     */
    int countDocumentRelease(DocumentReleaseQuery query);

    /**
     * 按类型条件查找统计个数
     *
     * @param query 查找条件
     * @return
     */
    int countAllDocumentRelease(DocumentReleaseQuery query);

    /**
     * 流程释出更新
     * @param query
     * @return
     */
    int updateDocumentReleaseForFlow(DocumentReleaseQuery query);

    /**
     * 生效开关打开
     *
     * @param documentReleasePO
     */
    int takeEffectDocumentRelease(DocumentReleasePO documentReleasePO);

    /**
     * 生效开关关闭
     *
     * @param documentReleasePO
     */
    int loseEffectDocumentRelease(DocumentReleasePO documentReleasePO);

    /**
     * 文件生效
     * @param documentReleasePO
     * @return
     */
    int takeEffectFlagDocumentRelease(DocumentReleasePO documentReleasePO);

    /**
     * 文件生效
     * @param collection
     * @return
     */
    int takeEffectFlagDocumentReleaseById(Collection<Long> collection);

    /**
     * 文件失效
     * @param documentReleasePO
     * @return
     */
    int loseEffectFlagDocumentRelease(DocumentReleasePO documentReleasePO);

    /**
     * 文件失效
     * @param collection
     * @return
     */
    int loseEffectFlagDocumentReleaseById(Collection<Long> collection);
}
